package com.xhd.springboot.base.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {
    @RequestMapping("/")
    public String index(ModelMap map){
        //加入一个属性，用来在模板中读取
        map.addAttribute("host","电子欢迎你");

        //return模板文件的名称，对应scr、main/resiurces/templates/index.html
        return "index";
    }


    @RequestMapping("/echarts")
    public String echarts(){
        return "echarts";
    }
}
